from django.conf.urls import url
from . import views

from rest_framework.routers import DefaultRouter
router = DefaultRouter()
router.register('search', views.SKUSearchVireSet,base_name='skus_search')


urlpatterns = [
    # 商品分类url
    url(r'^categories/$', views.CategoryView.as_view(), name='categories'),
    # /goods/categories/(?P<category_id>\d+)/hotskus/　热销商品
    url(r'^categories/(?P<category_id>\d+)/hotskus/$', views.HotSKUListView.as_view(), name='hot'),
    # /goods/categories/(?P<category_id>\d+)/skus/ 商品列表数据
    url(r'^categories/(?P<category_id>\d+)/skus/$', views.SKUListView.as_view(), name='list'),

]

urlpatterns += router.urls
